part of '../page.dart';

class _PremiumFeatureBlock extends StatelessWidget {
  const _PremiumFeatureBlock({
    required this.width,
    required this.title,
    required this.subtitle,
    required this.icon,
    Key? key,
  }) : super(key: key);

  final double width;
  final String title;
  final String subtitle;
  final Icon icon;

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: width,
      child: Align(
        alignment: Alignment.centerLeft,
        child: Row(
          mainAxisSize: MainAxisSize.min,
          children: [
            SizedBox(
              width: 32,
              child: Center(
                child: icon,
              ),
            ),
            const SizedBox(
              width: 16,
            ),
            Flexible(
              child: Column(
                mainAxisSize: MainAxisSize.min,
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text(
                    title,
                    style: WebPurchaseItemPageTheme.of(context).textTheme.premiumFeatureTitle,
                    textWidthBasis: TextWidthBasis.longestLine,
                    textAlign: TextAlign.start,
                  ),
                  const SizedBox(
                    height: 3,
                  ),
                  Text(
                    subtitle,
                    style: WebPurchaseItemPageTheme.of(context).textTheme.premiumFeatureSubtitle,
                    textWidthBasis: TextWidthBasis.longestLine,
                    textAlign: TextAlign.start,
                  ),
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}
